3.16 \(\int \frac{(d+e x)^2 (a+b \log (c x^n))}{x^4} \, dx\)

Optimal. Leaf size=75 \[ -\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 d x^3}-\frac{b d^2 n}{9 x^3}+\frac{b e^3 n \log (x)}{3 d}-\frac{b d e n}{2 x^2}-\frac{b e^2 n}{x} \]

[Out]

-(b*d^2*n)/(9*x^3) - (b*d*e*n)/(2*x^2) - (b*e^2*n)/x + (b*e^3*n*Log[x])/(3*d) - ((d + e*x)^3*(a + b*Log[c*x^n]
))/(3*d*x^3)

________________________________________________________________________________________

Rubi [A]  time = 0.0709689, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {37, 2334, 12, 43} \[ -\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 d x^3}-\frac{b d^2 n}{9 x^3}+\frac{b e^3 n \log (x)}{3 d}-\frac{b d e n}{2 x^2}-\frac{b e^2 n}{x} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-(b*d^2*n)/(9*x^3) - (b*d*e*n)/(2*x^2) - (b*e^2*n)/x + (b*e^3*n*Log[x])/(3*d) - ((d + e*x)^3*(a + b*Log[c*x^n]
))/(3*d*x^3)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx &=-\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 d x^3}-(b n) \int -\frac{(d+e x)^3}{3 d x^4} \, dx\\ &=-\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 d x^3}+\frac{(b n) \int \frac{(d+e x)^3}{x^4} \, dx}{3 d}\\ &=-\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 d x^3}+\frac{(b n) \int \left (\frac{d^3}{x^4}+\frac{3 d^2 e}{x^3}+\frac{3 d e^2}{x^2}+\frac{e^3}{x}\right ) \, dx}{3 d}\\ &=-\frac{b d^2 n}{9 x^3}-\frac{b d e n}{2 x^2}-\frac{b e^2 n}{x}+\frac{b e^3 n \log (x)}{3 d}-\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 d x^3}\\ \end{align*}

Mathematica [A]  time = 0.0385964, size = 76, normalized size = 1.01 \[ -\frac{6 a \left (d^2+3 d e x+3 e^2 x^2\right )+6 b \left (d^2+3 d e x+3 e^2 x^2\right ) \log \left (c x^n\right )+b n \left (2 d^2+9 d e x+18 e^2 x^2\right )}{18 x^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-(6*a*(d^2 + 3*d*e*x + 3*e^2*x^2) + b*n*(2*d^2 + 9*d*e*x + 18*e^2*x^2) + 6*b*(d^2 + 3*d*e*x + 3*e^2*x^2)*Log[c
*x^n])/(18*x^3)

________________________________________________________________________________________

Maple [C]  time = 0.121, size = 401, normalized size = 5.4 \begin{align*} -{\frac{b \left ( 3\,{e}^{2}{x}^{2}+3\,dex+{d}^{2} \right ) \ln \left ({x}^{n} \right ) }{3\,{x}^{3}}}-{\frac{-3\,i\pi \,b{d}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-9\,i\pi \,b{e}^{2}{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+9\,i\pi \,b{e}^{2}{x}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-9\,i\pi \,bdex{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +18\,\ln \left ( c \right ) b{e}^{2}{x}^{2}+18\,b{e}^{2}n{x}^{2}+18\,a{e}^{2}{x}^{2}+9\,i\pi \,bdex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) -9\,i\pi \,b{e}^{2}{x}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +3\,i\pi \,b{d}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +9\,i\pi \,b{e}^{2}{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +18\,\ln \left ( c \right ) bdex+9\,bdenx+18\,adex-9\,i\pi \,bdex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+3\,i\pi \,b{d}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-3\,i\pi \,b{d}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +9\,i\pi \,bdex{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+6\,\ln \left ( c \right ) b{d}^{2}+2\,b{d}^{2}n+6\,a{d}^{2}}{18\,{x}^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))/x^4,x)

[Out]

-1/3*b*(3*e^2*x^2+3*d*e*x+d^2)/x^3*ln(x^n)-1/18*(-3*I*Pi*b*d^2*csgn(I*c*x^n)^3-9*I*Pi*b*e^2*x^2*csgn(I*c*x^n)^
3+9*I*Pi*b*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2-9*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+18*ln(c)*b*e
^2*x^2+18*b*e^2*n*x^2+18*a*e^2*x^2+9*I*Pi*b*d*e*x*csgn(I*c*x^n)^2*csgn(I*c)-9*I*Pi*b*e^2*x^2*csgn(I*x^n)*csgn(
I*c*x^n)*csgn(I*c)+3*I*Pi*b*d^2*csgn(I*c*x^n)^2*csgn(I*c)+9*I*Pi*b*e^2*x^2*csgn(I*c*x^n)^2*csgn(I*c)+18*ln(c)*
b*d*e*x+9*b*d*e*n*x+18*a*d*e*x-9*I*Pi*b*d*e*x*csgn(I*c*x^n)^3+3*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2-3*I*Pi*
b*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+9*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2+6*ln(c)*b*d^2+2*b*d^2*n+6
*a*d^2)/x^3

________________________________________________________________________________________

Maxima [A]  time = 1.16077, size = 135, normalized size = 1.8 \begin{align*} -\frac{b e^{2} n}{x} - \frac{b e^{2} \log \left (c x^{n}\right )}{x} - \frac{b d e n}{2 \, x^{2}} - \frac{a e^{2}}{x} - \frac{b d e \log \left (c x^{n}\right )}{x^{2}} - \frac{b d^{2} n}{9 \, x^{3}} - \frac{a d e}{x^{2}} - \frac{b d^{2} \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac{a d^{2}}{3 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^4,x, algorithm="maxima")

[Out]

-b*e^2*n/x - b*e^2*log(c*x^n)/x - 1/2*b*d*e*n/x^2 - a*e^2/x - b*d*e*log(c*x^n)/x^2 - 1/9*b*d^2*n/x^3 - a*d*e/x
^2 - 1/3*b*d^2*log(c*x^n)/x^3 - 1/3*a*d^2/x^3

________________________________________________________________________________________

Fricas [A]  time = 0.97004, size = 246, normalized size = 3.28 \begin{align*} -\frac{2 \, b d^{2} n + 6 \, a d^{2} + 18 \,{\left (b e^{2} n + a e^{2}\right )} x^{2} + 9 \,{\left (b d e n + 2 \, a d e\right )} x + 6 \,{\left (3 \, b e^{2} x^{2} + 3 \, b d e x + b d^{2}\right )} \log \left (c\right ) + 6 \,{\left (3 \, b e^{2} n x^{2} + 3 \, b d e n x + b d^{2} n\right )} \log \left (x\right )}{18 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^4,x, algorithm="fricas")

[Out]

-1/18*(2*b*d^2*n + 6*a*d^2 + 18*(b*e^2*n + a*e^2)*x^2 + 9*(b*d*e*n + 2*a*d*e)*x + 6*(3*b*e^2*x^2 + 3*b*d*e*x +
 b*d^2)*log(c) + 6*(3*b*e^2*n*x^2 + 3*b*d*e*n*x + b*d^2*n)*log(x))/x^3

________________________________________________________________________________________

Sympy [A]  time = 2.58323, size = 134, normalized size = 1.79 \begin{align*} - \frac{a d^{2}}{3 x^{3}} - \frac{a d e}{x^{2}} - \frac{a e^{2}}{x} - \frac{b d^{2} n \log{\left (x \right )}}{3 x^{3}} - \frac{b d^{2} n}{9 x^{3}} - \frac{b d^{2} \log{\left (c \right )}}{3 x^{3}} - \frac{b d e n \log{\left (x \right )}}{x^{2}} - \frac{b d e n}{2 x^{2}} - \frac{b d e \log{\left (c \right )}}{x^{2}} - \frac{b e^{2} n \log{\left (x \right )}}{x} - \frac{b e^{2} n}{x} - \frac{b e^{2} \log{\left (c \right )}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))/x**4,x)

[Out]

-a*d**2/(3*x**3) - a*d*e/x**2 - a*e**2/x - b*d**2*n*log(x)/(3*x**3) - b*d**2*n/(9*x**3) - b*d**2*log(c)/(3*x**
3) - b*d*e*n*log(x)/x**2 - b*d*e*n/(2*x**2) - b*d*e*log(c)/x**2 - b*e**2*n*log(x)/x - b*e**2*n/x - b*e**2*log(
c)/x

________________________________________________________________________________________

Giac [A]  time = 1.28461, size = 146, normalized size = 1.95 \begin{align*} -\frac{18 \, b n x^{2} e^{2} \log \left (x\right ) + 18 \, b d n x e \log \left (x\right ) + 18 \, b n x^{2} e^{2} + 9 \, b d n x e + 18 \, b x^{2} e^{2} \log \left (c\right ) + 18 \, b d x e \log \left (c\right ) + 6 \, b d^{2} n \log \left (x\right ) + 2 \, b d^{2} n + 18 \, a x^{2} e^{2} + 18 \, a d x e + 6 \, b d^{2} \log \left (c\right ) + 6 \, a d^{2}}{18 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^4,x, algorithm="giac")

[Out]

-1/18*(18*b*n*x^2*e^2*log(x) + 18*b*d*n*x*e*log(x) + 18*b*n*x^2*e^2 + 9*b*d*n*x*e + 18*b*x^2*e^2*log(c) + 18*b
*d*x*e*log(c) + 6*b*d^2*n*log(x) + 2*b*d^2*n + 18*a*x^2*e^2 + 18*a*d*x*e + 6*b*d^2*log(c) + 6*a*d^2)/x^3